<?php
defined('_JEXEC') or die('Restricted access');

jimport('joomla.application.component.model');

class DocarioModelFileproperties extends JModel {
    var $_id;

    function __construct() {
        parent::__construct();
    }
    
    function setId($id) { $this->_id = $id; }
    
    function getFileInfo() {
        $query = 'select * from #__docario_file';
        $query .= ' where id='.$this->_id;
        
        $this->_db->setQuery($query);
        return $this->_db->loadObject();
    }
    
    function getFileRevisions() {
        $query = 'select * from #__docario_file_revision';
        $query .= ' where file_id='.$this->_id;
        
        $this->_db->setQuery($query);
        return $this->_db->loadObjectList();
    }
}
